import ajax from '@/utils/ajax'


/**
 * 删除记录
 * @param id 记录ID
 * @returns {*}
 */
export const del = function (id) {
    return ajax.post('/sys/menu/del', {
        id: id
    }, true)
}

/**
 * 获取菜单列表数据
 * @returns {*}
 */
export const getMenuListData = function () {
    return ajax.post('/sys/menu/getMenuListData')
}
/**
 * 获取菜单类型数据
 * @returns {*}
 */
export const getMenuTypeData = function () {
    return ajax.post('/sys/menu/getMenuTypeData')
}
/**
 * 获取菜单树
 * @returns {*}
 */
export const getMenuTreeNoBtn = function () {
    return ajax.post('/sys/menu/getMenuTreeNoBtn')
}


/**
 * 保存菜单
 */
export const saveMenu = (params) => {
    return ajax.post('/sys/menu/saveMenu', params)
}


/**
 * 获取模块按钮
 */
export const getMenuBtn = (menuId) => {
    return ajax.post('/sys/menu/getMenuBtn', {menuId: menuId}, true)
}
